<template>
  <div class="Echarts">
    <div id="LogLine-contain"></div>
  </div>
</template>

<script>
export default {
  name: 'LogLine',
  methods:{
    myEcharts(){
      // 基于准备好的dom，初始化echarts实例
      var myChart = this.$echarts.init(document.getElementById('LogLine-contain'));
      // 指定图表的配置项和数据
      var option = {
        tooltip: {},
        legend: {
          data:['登录次数']
        },
        xAxis: {
          data: ["2023/12/28","2023/12/29","2023/12/30","2023/12/31","2024/1/1","2024/1/2"]
        },
        yAxis: {},
        series: [{
          name: '登录次数',
          type: 'line',
          data: [5, 20, 36, 10, 10, 20]
        }]
      };
      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
    }
  },
  mounted() {
  	this.myEcharts();
  }
}
</script>

<style lang="scss">
.Echarts {
  width: 100%;
  height: 100%;
  > div {
    width: 100%;
    height: 100%;
  }
}
</style>